home *** CD-ROM | disk | FTP | other *** search
- Path: news.nodak.edu!plains!jengel
- From: jengel@plains.nodak.edu (John H. Engel)
- Newsgroups: comp.lang.c++
- Subject: Re: Help with derived class of ifstream class
- Date: 9 Mar 1996 02:37:41 GMT
- Organization: North Dakota Higher Education Computing Network (NDHECN)
- Message-ID: <4hqqtl$871@daily-planet.nodak.edu>
- References: <4hob5n$65c@daily-planet.nodak.edu> <486.6641T879T944@panix.com>
- NNTP-Posting-Host: plains.nodak.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=US-ASCII
- Content-Transfer-Encoding: 7bit
- X-Newsreader: TIN [version 1.2 PL2]
-
- Dae Choi (gugu@panix.com) wrote:
- : Hi,
-
- : >#include <iostream.h>
-
- : Perhaps you forgot to add:
-
- : #include <iomanip.h>
-
- : >#include <fstream.h>
- : >class X:public ifstream{
- : >public:
- : > int read();
- : > X(char *s):ifstream(s){;};
- : >};
-
- : >int X::read(){
- : > int i;
- : > (*this) >> i; // this is ok
- : > (*this) >> hex >> i; // compiler does not like this
- : ^^^
- : >};
-
- : >The error I get is
- : > no match for 'operator >>(class X, enum ios::{anonymous})
-
- : Hope this helps :^)
-
- I tried this but it still didn't work. Thanks anyways.
-
- --john
-
-